gdkwindow: Don't bother with a return parameter for queue_antiexpose
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 21 Jun 2014 22:03:56 +0000 (18:03 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 21 Jun 2014 22:45:39 +0000 (18:45 -0400)
Standard refcounting works perfectly well. Don't give us the opportunity
for more memory leaks.

gdk/broadway/gdkwindow-broadway.c
gdk/gdkoffscreenwindow.c
gdk/gdkwindow.c
gdk/gdkwindowimpl.h
gdk/quartz/gdkwindow-quartz.c
gdk/wayland/gdkwindow-wayland.c
gdk/win32/gdkwindow-win32.c
gdk/x11/gdkgeometry-x11.c
gdk/x11/gdkprivate-x11.h

index cfc3e4bbfa5c0a3f3a77b6ff82c256446bfebed0..406384e06b438d7eef4639356639ccdc49f711ad 100644 (file)
@@ -1495,11 +1495,10 @@ _gdk_broadway_display_after_process_all_updates (GdkDisplay *display)
 {
 }
 
-static gboolean
+static void
 gdk_broadway_window_queue_antiexpose (GdkWindow *window,
                                       cairo_region_t *area)
 {
-  return FALSE;
 }
 
 guint32
index 5ee179f86d9c2881b6262a497fe03e8cbfa5897e..f54d3d14aee8d8bd74151052e7014233c57c1f76 100644 (file)
@@ -542,11 +542,10 @@ gdk_offscreen_window_get_geometry (GdkWindow *window,
     }
 }
 
-static gboolean
+static void
 gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
                                       cairo_region_t *area)
 {
-  return FALSE;
 }
 
 /**
index ad93c9ba898b7b339901d213873c3abc28d05ad2..556565f1c1c0b0e144c0ec772627776fba453812 100644 (file)
@@ -3333,7 +3333,6 @@ static void
 gdk_window_process_updates_internal (GdkWindow *window)
 {
   GdkWindowImplClass *impl_class;
-  gboolean save_region = FALSE;
   GdkRectangle clip_box;
   GdkWindow *toplevel;
 
@@ -3375,12 +3374,12 @@ gdk_window_process_updates_internal (GdkWindow *window)
          cairo_region_get_extents (update_area, &clip_box);
          expose_region = cairo_region_copy (update_area);
          impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
-         save_region = impl_class->queue_antiexpose (window, update_area);
+         impl_class->queue_antiexpose (window, update_area);
           impl_class->process_updates_recurse (window, expose_region);
          cairo_region_destroy (expose_region);
        }
-      if (!save_region)
-       cairo_region_destroy (update_area);
+
+      cairo_region_destroy (update_area);
     }
 
   window->in_update = FALSE;
index 694a244761727d9c831ff8ad92d5dcc8ca7788d7..950db024b3a082f753a865115b9fbbefb3c677ae 100644 (file)
@@ -126,12 +126,10 @@ struct _GdkWindowImplClass
 
   /* Called before processing updates for a window. This gives the windowing
    * layer a chance to save the region for later use in avoiding duplicate
-   * exposes. The return value indicates whether the function has a saved
-   * the region; if the result is TRUE, then the windowing layer is responsible
-   * for destroying the region later.
+   * exposes.
    */
-  gboolean     (* queue_antiexpose)     (GdkWindow       *window,
-                                        cairo_region_t  *update_area);
+  void     (* queue_antiexpose)     (GdkWindow       *window,
+                                     cairo_region_t  *update_area);
 
 /* Called to do the windowing system specific part of gdk_window_destroy(),
  *
index 50d68654505c1eaa39ead8a17c15026ccf4cdeb5..fa3e65d3c9910bec9bb21ed82954113db1d12065 100644 (file)
@@ -2057,11 +2057,10 @@ gdk_window_quartz_set_static_gravities (GdkWindow *window,
   return FALSE;
 }
 
-static gboolean
+static void
 gdk_quartz_window_queue_antiexpose (GdkWindow *window,
                                     cairo_region_t *area)
 {
-  return FALSE;
 }
 
 static void
index 970485f67d5b89f6081e03c98cd605ca057053de..00cf2185ecf0c271264e1049f4470f4ebcaf24ba 100644 (file)
@@ -1335,11 +1335,10 @@ gdk_window_wayland_set_static_gravities (GdkWindow *window,
   return TRUE;
 }
 
-static gboolean
+static void
 gdk_wayland_window_queue_antiexpose (GdkWindow      *window,
                                      cairo_region_t *area)
 {
-  return FALSE;
 }
 
 static void
index 23e1848c0221da1f4c7e3da9782b8758499689c2..e4c93cac4ef969c5d53b0b93be46328ae010c51c 100644 (file)
@@ -3238,9 +3238,9 @@ gdk_win32_window_get_shape (GdkWindow *window)
   return NULL;
 }
 
-static gboolean
+static void
 _gdk_win32_window_queue_antiexpose (GdkWindow *window,
-                                   cairo_region_t *area)
+                                    cairo_region_t *area)
 {
   HRGN hrgn = cairo_region_to_hrgn (area, 0, 0);
 
@@ -3251,8 +3251,6 @@ _gdk_win32_window_queue_antiexpose (GdkWindow *window,
   ValidateRgn (GDK_WINDOW_HWND (window), hrgn);
 
   DeleteObject (hrgn);
-
-  return FALSE;
 }
 
 static void
index 3f8c8c5f15edbd86d498a38f8f03692782f2c2ac..cfcbec891aa4b6d318bd244b62f235fde4fb6821 100644 (file)
@@ -212,16 +212,14 @@ gdk_window_queue (GdkWindow          *window,
   g_queue_push_tail (display_x11->translate_queue, item);
 }
 
-gboolean
+void
 _gdk_x11_window_queue_antiexpose (GdkWindow *window,
                                  cairo_region_t *area)
 {
   GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
-  item->antiexpose_area = area;
+  item->antiexpose_area = cairo_region_reference (area);
 
   gdk_window_queue (window, item);
-
-  return TRUE;
 }
 
 void
index fcd6da42026da954313d1b9082db5a1e4ebcea93..d5f3e1d74f623ac98ff9317c7876a689aadfba27 100644 (file)
@@ -126,7 +126,7 @@ void     _gdk_x11_window_change_property   (GdkWindow    *window,
 void     _gdk_x11_window_delete_property   (GdkWindow    *window,
                                             GdkAtom       property);
 
-gboolean _gdk_x11_window_queue_antiexpose  (GdkWindow *window,
+void     _gdk_x11_window_queue_antiexpose  (GdkWindow *window,
                                             cairo_region_t *area);
 void     _gdk_x11_window_translate         (GdkWindow *window,
                                             cairo_region_t *area,